package cn.school.dao;

import java.sql.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.school.entity.Student;

public interface StudentDao {
	public int add(Student stu);

	public int deleteByStuId(@Param("no") long l);

	public int deletesByStuId(@Param("id") List l);

	public int updateByStuId(Student st);

	public List<Student> searchBySname(@Param("sname") String sname);

	/**
	 * @param age 鏌ヨ锛屼竴涓勾榫勮寖鍥村弬鏁帮紝1琛ㄧず18宀佷互涓嬶紝2琛ㄧず 18-25,3琛ㄧず25-30,4琛ㄧず30浠ヤ笂
	 * @return
	 */
	public List<Student> searchByAge(@Param("age") int age);

	public List<Student> search(@Param("pageno") int pageno, @Param("pagesize") int pagesize);

	// 瀹屽杽瀛︾敓鐨勪俊鎭煡璇細鎸夌収骞寸骇缂栧彿锛屽鍚嶃�佹墜鏈哄彿銆佽韩浠借瘉鍙凤紝浠ュ強鍏ュ鏃堕棿锛堟寜鐓у尯闂达級鐨勬煡璇紝
	// 鍏朵腑濮撳悕銆佹墜鏈哄彿銆佽韩浠借瘉鍙风敤妯＄硦鏌ヨ鍚屾椂瑕佹煡璇㈠湪鍚屾牱鏉′欢涓嬬殑鎬绘暟
	public List<Student> searchLimitByMohu(@Param("pageno") int pageno, @Param("pagesize") int pagesize);

	public int countByMohu(@Param("gid") long gid, @Param("name") String name, @Param("tele") String tele,
			@Param("enterdatestart") Date enterdatestart, @Param("enterdateend") Date enterdateend);
}
